package com.bonc.insight.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author bonc
 * @since 2022-01-14
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@Accessors(chain = true)
public class TAccessToken implements Serializable{

    private static final long serialVersionUID=1L;

    /** 访问令牌 */
    @TableId(value = "access_token" ,type = IdType.ASSIGN_UUID)
    private String accessToken;

    /** token生成时间 */
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 过期时间：3600s */
    @TableField(value = "expires_in")
    private String expiresIn;

    /** 22222 */
    @TableField(value = "refresh_token_fk")
    private String refreshTokenFk;

    /** 11111 */
    @TableField(value = "account_fk")
    private String accountFk;

}
